<?php
class App_Db
{
    const LOCAL_DB_NAME = 'kucun';
    static protected $_local_db = null;
    
    private function __construct(){}
    
    private function __clone(){}
    
 	static public function localDb()
    {
        if (self::$_local_db === null) {
            $params = array ('host'     => 'localhost',
                             'username' => 'root',
                             'password' => '123456',
                             'dbname'   => self::LOCAL_DB_NAME);
            $db = Zend_Db::factory('PDO_MYSQL', $params);
            $db->query('SET NAMES `utf8`');
            self::$_local_db = $db;
        }
        return self::$_local_db;
    }
}
